// 资料管理 部分
import request from '@/utils/axios'
import {
  URL_API
} from '@/utils/mUtils'
const base = URL_API()
// 地址库接口
export function region(params) {
  return request({
    url: `${base}/api/company/region`,
    method: 'post',
    data: params,
  })
}
// 网点接口
export function website_list(params = {}) {
  return request({
    url: `${base}/api/company/organizational/branch/website_list`,
    method: 'post',
    data: params,
  })
}
// 发运方管理 ===========================
// 发运方列表
// export function shippinglist(params) {
//   return request({
//     url: `${base}/api/company/shipper/list`,
//     method: 'get',
//     data: params,
//   })
// }
// 创建发货方
export function Addshipping(params) {
  return request({
    url: `${base}/api/company/shipper/create`,
    method: 'post',
    data: params,
  })
}
// 编辑发货方
export function Amendshipping(params) {
  return request({
    url: `${base}/api/company/shipper/update`,
    method: 'put',
    data: params,
  })
}
// 发货方详情
export function Detailsshipping(params) {
  return request({
    url: `${base}/api/company/shipper/detail`,
    method: 'post',
    data: params,
  })
}
//   发货方删
export function deleteShipping(params) {
  return request({
    url: `${base}/api/company/shipper/delete`,
    method: 'delete',
    data: params,
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  })
}
//   发货方搜索
export function queryshipping(params) {
  return request({
    url: `${base}/api/company/shipper/list`,
    method: 'post',
    data: params,
  })
}
// 发货公司接口
export function customerPeople(params) {
  return request({
    url: `${base}/api/company/customer/box`,
    method: 'post',
    data: params,
  })
}
// 收货人管理===============
// 新增收货人
export function consigneecreate(params) {
  return request({
    url: `${base}/api/company/consignee/create`,
    method: 'post',
    data: params,
  })
}
// 详情接口
export function consigneedetail(params) {
  return request({
    url: `${base}/api/company/consignee/detail`,
    method: 'post',
    data: params,
  })
}
// 修改收货人
export function consigneeupdate(params) {
  return request({
    url: `${base}/api/company/consignee/update`,
    method: 'PUT',
    data: params,
  })
}
// 删除收货人
export function consigneedelete(params) {
  return request({
    url: `${base}/api/company/consignee/delete`,
    method: 'delete',
    data: params,
  })
}
// 收货人查询接口
export function queryconsignee(params) {
  return request({
    url: `${base}/api/company/consignee/list`,
    method: 'post',
    data: params,
  })
}
// 承运方管理 =====================
// 承运方列表
export function Acceptlist(params) {
  return request({
    url: `${base}/api/company/carrier/list`,
    method: 'post',
    data: params,
  })
}
// 创建承运方
export function AddAccept(params) {
  return request({
    url: `${base}/api/company/carrier/create`,
    method: 'post',
    data: params,
  })
}
// 编辑承运方
export function EditAccept(params) {
  return request({
    url: `${base}/api/company/carrier/update`,
    method: 'put',
    data: params,
  })
}
// 承运方详情
export function DetailsAccept(params) {
  return request({
    url: `${base}/api/company/carrier/detail`,
    method: 'post',
    data: params,
  })
}

// 删除承运方
export function deleteAccept(params) {
  return request({
    url: `${base}/api/company/carrier/delete`,
    method: 'delete',
    data: params,
  })
}

// 承运方导出
export function carrierexport(params) {
  return request({
    url: `${base}/api/company/carrier/list/export`,
    method: 'post',
    data: params,
  })
}
// 司机管理 =============

// 司机编辑
export function EditDriver(params) {
  return request({
    url: `${base}/api/company/driver/update`,
    method: 'put',
    data: params,
  })
}
// 司机删除
export function DeleteDriver(params) {
  return request({
    url: `${base}/api/company/driver/delete`,
    method: 'DELETE',
    data: params,
  })
}
// 司机详情
export function detailsDriver(params) {
  return request({
    url: `${base}/api/company/driver/detail`,
    method: 'POST',
    data: params,
  })
}
// 查询司机
export function queryDriver(params) {
  return request({
    url: `${base}/api/company/driver/list`,
    method: 'post',
    data: params,
  })
}
// 创建司机
export function addDriver(params) {
  return request({
    url: `${base}/api/company/driver/create`,
    method: 'post',
    data: params,
  })
}
// 承运商的id
export function carrierID(params) {
  return request({
    url: `${base}/api/company/carrier/box`,
    method: 'post',
    data: params,
  })
}
// 车辆管理===========
// 车辆列表
// 编辑车辆
export function EditCar(params) {
  return request({
    url: `${base}/api/company/vehicle/update`,
    method: 'put',
    data: params,
  })
}
// 删除车辆
export function DeleteCar(params) {
  return request({
    url: `${base}/api/company/vehicle/delete`,
    method: 'DELETE',
    data: params,
  })
}
// 车辆详情
export function DetailsCar(params) {
  return request({
    url: `${base}/api/company/vehicle/detail`,
    method: 'post',
    data: params,
  })
}
// 创建车辆信息
export function AddCar(params) {
  return request({
    url: `${base}/api/company/vehicle/create`,
    method: 'post',
    data: params,
  })
}
// 查询车辆信息
export function queryCar(params) {
  return request({
    url: `${base}/api/company/vehicle/list`,
    method: 'post',
    data: params,
  })
}
// 保温箱管理=============
// 保温箱列表
export function IncubatorList(params) {
  return request({
    url: `${base}/api/company/incubator/list`,
    method: 'post',
    data: params,
  })
}
// 编辑保温箱
export function EditIncubator(params) {
  return request({
    url: `${base}/api/company/incubator/update`,
    method: 'put',
    data: params,
  })
}
// 保温箱详情
export function DetailIncubator(params) {
  return request({
    url: `${base}/api/company/incubator/detail`,
    method: 'post',
    data: params,
  })
}
// 删除保温箱
export function DeleteIncubator(params) {
  return request({
    url: `${base}/api/company/incubator/delete`,
    method: 'DELETE',
    data: params,
  })
}
// 添加保温箱
export function AddIncubator(params) {
  return request({
    url: `${base}/api/company/incubator/create`,
    method: 'post',
    data: params,
  })
}
// 温度计获取
export function thermometerbox(params) {
  return request({
    url: `${base}/api/company/thermometer/box`,
    method: 'post',
    data: params,
  })
}
// 温度计管理
// 温度计列表
// 温度计编辑
export function EditThermometer(params) {
  return request({
    url: `${base}/api/company/thermometer/update`,
    method: 'put',
    data: params,
  })
}
// 温度计详情
export function DetailsThermometer(params) {
  return request({
    url: `${base}/api/company/thermometer/detail`,
    method: 'post',
    data: params,
  })
}
// 温度计添加
export function AddThermometer(params) {
  return request({
    url: `${base}/api/company/thermometer/create`,
    method: 'post',
    data: params,
  })
}
// 温度计查询
export function QueryThermometer(params) {
  return request({
    url: `${base}/api/company/thermometer/list`,
    method: 'post',
    data: params,
  })
}
// 温度计的生产厂家
export function Firmoptions(params) {
  return request({
    url: `${base}/api/temperature/firm/options`,
    method: 'post',
    data: params,
  })
}
// 温度计删除
export function DeleteThermomenter(params) {
  return request({
    url: `${base}/api/company/thermometer/delete`,
    method: 'DELETE',
    data: params,
  })
}
// 路由管理
// 路由列表
export function routerList(params) {
  return request({
    url: `${base}/api/company/router/list`,
    method: 'post',
    data: params,
  })
}
// 编辑路由
export function EditRouter(params) {
  return request({
    url: `${base}/api/company/router/update`,
    method: 'put',
    data: params,
  })
}
// 路由详情
export function DetailsRouter(params) {
  return request({
    url: `${base}/api/company/router/detail`,
    method: 'post',
    data: params,
  })
}
// 删除路由
export function DeleteRouter(params) {
  return request({
    url: `${base}/api/company/router/delete`,
    method: 'delete',
    data: params,
  })
}
// 路由创建
export function AddRouter(params) {
  return request({
    url: `${base}/api/company/router/create`,
    method: 'post',
    data: params,
  })
}
// 仓库管理
// 仓库列表
export function EntrepotList(params) {
  return request({
    url: `${base}/api/company/warehouse/list`,
    method: 'post',
    data: params,
  })
}
// 仓库编辑
export function EditEntrepot(params) {
  return request({
    url: `${base}/api/company/warehouse/update`,
    method: 'put',
    data: params,
  })
}
// 仓库详情
export function DetailsEntrepot(params) {
  return request({
    url: `${base}/api/company/warehouse/detail`,
    method: 'POST',
    data: params,
  })
}
// 仓库删除
export function DeleteEntrepot(params) {
  return request({
    url: `${base}/api/company/warehouse/delete`,
    method: 'delete',
    data: params,
  })
}
// 仓库创建
export function AddEntrepot(params) {
  return request({
    url: `${base}/api/company/warehouse/create`,
    method: 'post',
    data: params,
  })
}
// 仓库查询
export function QueryEntrepot(params) {
  return request({
    url: ``,
    method: '',
    data: params,
  })
}
// 发票簿列表
export function InvoiceBookList(params) {
  return request({
    url: `${base}/api/finance/invoice_book/list`,
    method: 'post',
    data: params,
  })
}
// 发票簿创建
export function InvoiceBookCreate(params) {
  // // console.log(params, "jflkajsdflka")
  return request({
    url: `${base}/api/finance/invoice_book/create`,
    method: 'post',
    data: params,
  })
}
// 发票簿编辑装
export function InvoiceBookUpdate(params) {
  return request({
    url: `${base}/api/finance/invoice_book/update`,
    method: 'put',
    data: params,
  })
}
// 客户数据获取
export function customerList(params) {
  return request({
    url: `${base}/api/company/customer/name/list`,
    method: 'post',
    data: params,
  })
}
// 承运商数据
export function carrierList(params) {
  return request({
    url: `${base}/api/company/carrier/name/list`,
    method: 'post',
    data: params,
  })
}
// 发票主体所属
export function InvoiceBookoptions(params) {
  return request({
    url: `${base}/api/finance/invoice_book/options`,
    method: 'post',
    data: params,
  })
}

// 删除主体的功能
export function InvoiceBookdelete(params) {
  return request({
    url: `${base}/api/finance/invoice_book/delete`,
    method: 'delete',
    data: params,
  })
}
// 删除主体的功能
export function ModifyDriverPassword(params) {
  return request({
    url: `${base}/api/company/driver/update/password`,
    method: 'post',
    data: params,
  })
}
// 账号流水
export function financeflow_list(params) {
  return request({
    url: `${base}/api/finance/invoice_book/flow_list`,
    method: 'post',
    data: params,
  })
}

// 发票簿列表
export function invoiceBookoptions(params) {
  return request({
    url: `${base}/api/finance/invoice_book/options`,
    method: 'post',
    data: params,
  })
}
// 账号流水
export function invoice_book_flow_list(params) {
  return request({
    url: `${base}/api/finance/invoice_book/flow_list/export`,
    method: 'post',
    data: params,
  })
}
// 创建授权
export function firm_Auth_create(params) {
  return request({
    url: `${base}/api/temperature/firm/auth/create`,
    method: 'post',
    data: params,
  })
}
// 授权列表接口
export function firm_Auth_List(params) {
  return request({
    url: `${base}/api/temperature/firm/auth/list`,
    method: 'post',
    data: params,
  })
}
// 授权删除接口
export function firm_Auth_delete(params) {
  return request({
    url: `${base}/api/temperature/firm/auth/delete`,
    method: 'post',
    data: params,
  })
}
// 授权详情接口
export function firm_Auth_detail(params) {
  return request({
    url: `${base}/api/temperature/firm/auth/detail`,
    method: 'post',
    data: params,
  })
}
// 授权修改接口
export function firm_Auth_update(params) {
  return request({
    url: `${base}/api/temperature/firm/auth/update`,
    method: 'post',
    data: params,
  })
}
// 授权下了接口
export function firm_Auth_options(params) {
  return request({
    url: `${base}/api/temperature/firm/auth/options`,
    method: 'post',
    data: params,
  })
}
// gps 厂商授权
export function position_firm_options(params) {
  return request({
    url: `${base}/api/position/firm/options`,
    method: 'post',
    data: params,
  })
}
// gps 厂商授权 创建
export function position_firm_create(params) {
  return request({
    url: `${base}/api/position/firm/auth/create`,
    method: 'post',
    data: params,
  })
}
// gps 厂商授权 修改
export function position_firm_update(params) {
  return request({
    url: `${base}/api/position/firm/auth/update`,
    method: 'post',
    data: params,
  })
}
// gps 厂商授权 列表
export function position_firm_list(params) {
  return request({
    url: `${base}/api/position/firm/auth/list`,
    method: 'post',
    data: params,
  })
}
// gps 厂商授权 详情
export function position_firm_detail(params) {
  return request({
    url: `${base}/api/position/firm/auth/detail`,
    method: 'post',
    data: params,
  })
}
// gps 厂商授权 删除
export function position_firm_delete(params) {
  return request({
    url: `${base}/api/position/firm/auth/delete`,
    method: 'post',
    data: params,
  })
}
// gps 厂商授权下拉
export function position_firm_auth_options(params) {
  return request({
    url: `${base}/api/position/firm/auth/options`,
    method: 'post',
    data: params,
  })
}

// 根据id获取保温箱编号
export function reqIncubatorCodes(params) {
  return request({
    url: `${base}/api/company/incubator/print`,
    method: 'post',
    data: params,
  })
}
export function capacityOptions(params) {
  return request({
    url: `${base}/api/company/incubator/capacity/options`,
    method: 'post',
    data: params,
  })
}